package com.finance.console.entity;

import java.math.BigDecimal;
import java.util.Date;

public class IncomeExpense {
    private int id;
    private int userId;
    private BigDecimal amount; // 金额
    private String type; // 类型：INCOME/EXPENSE
    private String category; // 分类：餐饮/交通等
    private Date time; // 记录时间

    // 必须包含以下getter方法（名称与Service调用完全一致）
    public BigDecimal getAmount() {
        return amount;
    }
    public String getType() { // 注意是getType()而非gettype()
        return type;
    }
    public String getCategory() {
        return category;
    }

    // 补充必要的setter和getter
    public int getUserId() {
        return userId;
    }
    public void setUserId(int userId) {
        this.userId = userId;
    }
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }
    public void setType(String type) {
        this.type = type;
    }
    public void setCategory(String category) {
        this.category = category;
    }
    public Date getTime() {
        return time;
    }
    public void setTime(Date time) {
        this.time = time;
    }
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
}